<?php
class Attributes extends DatabaseTable {

    public function __construct($conn) {
        parent::__construct($conn);
    }

    protected function load(){
        $attributes_table="attributes_".$this->getLanguage()->getCode();
        $query=sprintf("SELECT * FROM 	%s",
            mysql_real_escape_string($attributes_table));
	$result=mysql_query($query,$this->conn);
	if ($result){
            while ($row = mysql_fetch_assoc($result)) {
                $value=$row['value'];
                $name=$row['name'];
                $valueMobile=$row['value_mobile'];
                $attribute= new Attribute();
                $attribute->setValue($value);
                $attribute->setName($name);
                $attribute->setValueMobile($valueMobile);
                $this->records[$name] = $attribute;
            }
        }
	mysql_free_result($result);
    }
}
?>
